/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2023-12-26 21:33:02
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2023-12-26 22:36:18
 * @FilePath: /ruoyi-ui/mock/index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require("express");
const Mock = require("mockjs");
const { stateList } = require("./state.mock");
const { unsedaList } = require("./unseda.mock");
const { localList } = require("./local.mock");
const { identityList } = require("./identity.mock");
const app = express();
const cors = require('cors');
app.use(cors());
const port = 3000;

app.use(express.json());

// 创建一个 GET 接口，使用 Mock.js 生成模拟数据
app.get("/api/getStateList", stateList);
app.get("/api/getUnsedaList", unsedaList);
app.get("/api/getLocalList", localList);
app.get("/api/getIdentityList", identityList);

// 启动服务
app.listen(port, () => {
  console.log(`Server is running on port ${port}`);
});
